﻿using System;
using System.Linq;
using XEvolve.Core.Runtime.Internal;

namespace XEvolve.Core.Runtime.PluginProviders
{
    public class CurrentAppDomain : IPluginProvider
    {
        public Type[] Plugins
        {
            get
            {
                return AppDomain.CurrentDomain.GetAssemblies().SelectMany(assembly => assembly.GetPlugins()).ToArray();
            }
        }
    }
}
